#pragma once

#include <Object2D.h>
#include <lib3d/node/Node.h>
#include <CompilerFeatures.h>

#include <Atom.h>

namespace liba {
namespace lib3d {
namespace node {

class Node2D
	: public Node
	, public Object2D
{
public:
	Node2D(const Atom & name, Node * parent);
	Node2D(const Node2D& rhs);
	virtual math::Rect<float> GetGlobalBounds() LIBA_OVERRIDE;
	virtual float GetZ() LIBA_OVERRIDE;

	virtual math::Rect<float> GetLocalBounds() = 0;

	virtual math::Vector2<float> GlobalToLocal(const math::Vector2<float>& pt) LIBA_OVERRIDE;
	virtual math::Vector2<float> LocalToGlobal(const math::Vector2<float>& pt) LIBA_OVERRIDE;
protected:
	virtual void OnGlobalMatrixInvalidated() LIBA_OVERRIDE;
};

} // namespace node
} // namespace lib3d
} // namespace liba